package com.cdd.agent.api.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.cdd.common.domain.entity.AppGuild;
import com.cdd.agent.api.mapper.AppGuildMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author cdd
 * @date 2025-08-08 10:57
 */
@Service
public class AppGuildService {

    @Resource
    private AppGuildMapper appGuildMapper;

    public AppGuild get(Integer userId) {
        return appGuildMapper.selectOne(
                new LambdaQueryWrapper<AppGuild>()
                        .eq(AppGuild::getExamine, 1)
                        .eq(AppGuild::getUser_id, userId)
        );
    }
}
